#include "VirtulMachine.hpp"
#include <Windows.h>
#include <Windowsx.h>
Level2::VirtulMachine::StackList::StackList(size_t size) :
	maxSize(size)
{
	RSP = stackTop = static_cast<unsigned __int64*>(VirtualAlloc(nullptr, size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE));
	if (!RSP)
	{
		exit(-1);
	}
}
bool Level2::VirtulMachine::Execute1Instruction(void** pCode)
{
	using Code = Level2::VirtulMachine::VirtualMachineCode;
	switch (*(Code*)pCode++)
	{
	case Code::NOP:
		break;
	case Code::ADD:
		break;
	}
	return true;
}